# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dnsrecon
pkgver=1.1.5
pkgrel=2
pkgdesc="DNS Enumeration Script"
url="https://github.com/darkoperator/dnsrecon"
arch="noarch"
license="GPL-2.0-only"
depends="py3-dnspython py3-lxml py3-netaddr py3-setuptools"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="py3-pytest"
options="!check"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/darkoperator/dnsrecon/archive/$pkgver.tar.gz"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
c28d8865b336ac09ab4229f858cd4c1b0a248408f4f60a86e0976475c5bbb86f8d1185e08c288cad0977b777b42c7cf0d8da468a985317a2fe23cc6ca81fbff0  dnsrecon-1.1.5.tar.gz
"
